from datetime import datetime

from sqlalchemy import *
from SysDB import BntTableBase


class TablesTest1(BntTableBase):
    # 表名
    __tablename__ = 'tables_test1'

    id = Column(Integer, primary_key=True, autoincrement=True, doc='id')
    # 必填
    nike_name = Column(String(255), default='', doc='昵称')
    data_state = Column(Integer, doc='0,存在, 1删除')
    created_at = Column(DateTime, doc='创建时间')

    def __init__(self, nike_name):
        self.nike_name = nike_name
        self.data_state = 0
        self.created_at = datetime.now()
